package com.design.pattern.creator.singleton.hungry;

public class HungryStaticSingleton {
    private static final HungryStaticSingleton instance;

    /**
     * 通过static块，在类加载的时候初始化实例
     */
    static  {
        instance = new HungryStaticSingleton();
    }
    private HungryStaticSingleton(){}
    public static HungryStaticSingleton getInstance(){
        return instance;
    }
}
